-- GENERATED SPELL FOR [Dark Rune Protector] --


function spell0_27983(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(22120,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27983', 608, 1)
end

function spell1_27983(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(42724,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27983', 618, 1)
end

function Sorts_27983(pUnit, Event)
local choix_sorts_27983 = math.random(0, 1)
if choix_sorts_27983 == 0 then
pUnit:RegisterEvent('spell0_27983', 1, 1)
end
if choix_sorts_27983 == 1 then
pUnit:RegisterEvent('spell1_27983', 1, 1)
end
end

function mob27983_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27983', math.random(1500, 3000), 1)
end

function mob27983_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27983_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27983_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27983, 1, 'mob27983_Action')
RegisterUnitEvent(27983, 2, 'mob27983_Leave')
RegisterUnitEvent(27983, 3, 'mob27983_Kill')
RegisterUnitEvent(27983, 4, 'mob27983_Die')
